Namespace("sketch.ui.iphone");

(function(fwk, ui) {
    ui.iphone.Keyboard = klass(fwk.ImageElement, (function(){
        var onTypeChanged = function(event){
            switch(event.newValue){
                case 'text':
                    this.src('/img/ios/keyboard_text.png');
                break;
                case 'symbols':
                    this.src('/img/ios/keyboard_symbols.png');
                break;
                case 'numeric':
                    this.src('/img/ios/keyboard_numeric.png');
                break;
            }
        };

        return {
            _constructor:function() {
                this.properties.createProperty("type", "Keyboard type", "text")
                    .possibleValues({'text':'Text', 'symbols':'Symbols', 'numeric':'Numeric'})
                    .useInModel()
                    .editorTemplate("#editor-dropdown");
                this.properties.bind('type', new EventHandler(this, onTypeChanged));
                this.src('/img/ios/keyboard_text.png');
            },
            type:function(value){
                return this.properties.type(value);
            }
        };


    })());
})(sketch.framework, sketch.ui);